package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.LacontrolDTO;
import com.lening.iot.po.LacontrolPO;
import com.lening.iot.service.LacontrolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:59
 */
@RestController
@RequestMapping("/lacontrols")
public class LacontrolController extends BaseController<LacontrolPO, LacontrolDTO, LacontrolService> {
    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private LacontrolService lacontrolService;
    @GetMapping("/getAllLa")
    public Page<LacontrolDTO> getAllAcl(Page<LacontrolDTO> lacontrolDTOPage){
        Page<LacontrolDTO> laList = lacontrolService.getAllLa(lacontrolDTOPage);
        return laList;
    }

//    @Override
//    public Page<?> page(LacontrolDTO lacontrolDTO) {
//        return lacontrolService.getAllLa(lacontrolDTO);
//    }
@GetMapping("/getAll")
public List<LacontrolDTO> getAll(String communityName) {
return lacontrolService.getAll(communityName);
}
}
